import { defineStore } from "pinia";
import { ref } from "vue"

import axios from "../ajax";
export const userStore = defineStore("user", () => {
    
    let userInfo = ref({});
    const getUserInfo = async () => {  //获取个人信息数据
        let res = await axios.get("/adminUser/profile");
        userInfo.value = res;
    };

    return { userInfo, getUserInfo }
},{
    persist:true//*******************************8
})
